feat(@angular/cli): name lazy chunks - #6881
Merged
Merged
Conversation
hansl
reviewed
Jul 4, 2017
| return name(); | ||
| }; | ||
|
|
||
| return new (webpack as any).NamedChunksPlugin(function (chunk: any) { |
Contributor
There was a problem hiding this comment.
I don't think it's best practice for a constructor to return another class. Could you instead extends NamedChunksPlugin?
filipesilva
force-pushed
the
named-chunks
branch
4 times, most recently
from
July 4, 2017 20:26
56deef3 to
d8dd3eb
Compare
Before:
```
$ ng build --no-progress
Hash: ff03df269349b817eef4
Time: 11202ms
chunk {0} 0.chunk.js, 0.chunk.js.map 1.61 kB {1} {3} [rendered]
chunk {1} 1.chunk.js, 1.chunk.js.map 1.46 kB {0} {3} [rendered]
chunk {2} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 160 kB {6} [initial] [rendered]
chunk {3} main.bundle.js, main.bundle.js.map (main) 6.38 kB {5} [initial] [rendered]
chunk {4} styles.bundle.js, styles.bundle.js.map (styles) 10.5 kB {6} [initial] [rendered]
chunk {5} vendor.bundle.js, vendor.bundle.js.map (vendor) 2.16 MB [initial] [rendered]
chunk {6} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]
```
After:
```
$ ng build --no-progress
Hash: 2bc12a89f40f3b4818b5
Time: 9613ms
chunk {feature.module} feature.module.chunk.js, feature.module.chunk.js.map 1.46 kB {lazy.module} {main} [rendered]
chunk {inline} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]
chunk {lazy.module} lazy.module.chunk.js, lazy.module.chunk.js.map 1.61 kB {feature.module} {main} [rendered]
chunk {main} main.bundle.js, main.bundle.js.map (main) 6.38 kB {vendor} [initial] [rendered]
chunk {polyfills} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 160 kB {inline} [initial] [rendered]
chunk {styles} styles.bundle.js, styles.bundle.js.map (styles) 10.5 kB {inline} [initial] [rendered]
chunk {vendor} vendor.bundle.js, vendor.bundle.js.map (vendor) 2.16 MB [initial] [rendered]
```
Fix angular#6700
filipesilva
added a commit
to filipesilva/angular-cli
that referenced
this pull request
Jul 10, 2017
Followup to angular#6881 Also name chunks created via `import()` or `System.import()`.
filipesilva
added a commit
to filipesilva/angular-cli
that referenced
this pull request
Jul 10, 2017
Followup to angular#6881 Also name chunks created via `import()` or `System.import()`, and strip `.ngfactory` from the chunk name.
filipesilva
added a commit
to filipesilva/angular-cli
that referenced
this pull request
Jul 10, 2017
Followup to angular#6881 Also name chunks created via `import()` or `System.import()`, and strip `.ngfactory` from the chunk name.
hansl
pushed a commit
that referenced
this pull request
Jul 10, 2017
Followup to #6881 Also name chunks created via `import()` or `System.import()`, and strip `.ngfactory` from the chunk name.
hansl
pushed a commit
that referenced
this pull request
Jul 12, 2017
Followup to #6881 Also name chunks created via `import()` or `System.import()`, and strip `.ngfactory` from the chunk name.
filipesilva
added a commit
to filipesilva/angular-cli
that referenced
this pull request
Jul 17, 2017
Followup to angular#6881 Allow controlling chunk naming via the `--named-chunks` flag, which can be set on `.angular-cli.json` as well. Defaults to true in development, false in production.
filipesilva
added a commit
to filipesilva/angular-cli
that referenced
this pull request
Jul 18, 2017
Followup to angular#6881 Allow controlling chunk naming via the `--named-chunks` flag, which can be set on `.angular-cli.json` as well. Defaults to true in development, false in production.
filipesilva
added a commit
to filipesilva/angular-cli
that referenced
this pull request
Jul 18, 2017
Followup to angular#6881 Allow controlling chunk naming via the `--named-chunks` flag, which can be set on `.angular-cli.json` as well. Defaults to true in development, false in production.
filipesilva
added a commit
to filipesilva/angular-cli
that referenced
this pull request
Jul 19, 2017
Followup to angular#6881 Allow controlling chunk naming via the `--named-chunks` flag, which can be set on `.angular-cli.json` as well. Defaults to true in development, false in production.
filipesilva
added a commit
to filipesilva/angular-cli
that referenced
this pull request
Jul 19, 2017
Followup to angular#6881 Allow controlling chunk naming via the `--named-chunks` flag, which can be set on `.angular-cli.json` as well. Defaults to true in development, false in production.
filipesilva
added a commit
to filipesilva/angular-cli
that referenced
this pull request
Jul 19, 2017
Followup to angular#6881 Allow controlling chunk naming via the `--named-chunks` flag, which can be set on `.angular-cli.json` as well. Defaults to true in development, false in production.
filipesilva
added a commit
to filipesilva/angular-cli
that referenced
this pull request
Jul 19, 2017
Followup to angular#6881 Allow controlling chunk naming via the `--named-chunks` flag, which can be set on `.angular-cli.json` as well. Defaults to true in development, false in production.
Brocco
pushed a commit
that referenced
this pull request
Jul 19, 2017
Followup to #6881 Allow controlling chunk naming via the `--named-chunks` flag, which can be set on `.angular-cli.json` as well. Defaults to true in development, false in production.
dond2clouds
pushed a commit
to d2clouds/speedray-cli
that referenced
this pull request
Apr 23, 2018
Followup to angular#6881 Also name chunks created via `import()` or `System.import()`, and strip `.ngfactory` from the chunk name.
dond2clouds
pushed a commit
to d2clouds/speedray-cli
that referenced
this pull request
Apr 23, 2018
Followup to angular#6881 Allow controlling chunk naming via the `--named-chunks` flag, which can be set on `.angular-cli.json` as well. Defaults to true in development, false in production.
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before:
After:
Fix #6700